#include<bits/stdc++.h>
using namespace std;
const int N = 105;
string str;
int n;
int a[N][N];
int F[100];
int main()
{
    freopen("snake.in","r",stdin);
    freopen("snake.out","w",stdout);
    ios::sync_with_stdio(false);cin.tie(0);
    cin>>str;n = str.size();
    cout<<100<<" "<<100<<"\n";
    F['R' - 'A'] = 0;
    F['G' - 'A'] = 1;
    F['B' - 'A'] = 2;
    for(int i = 0;i < n;i++)
    {
        if((i/100)&1)
        {
            int x = i/100+1,y = 100-i%100;
            a[x][y] = F[str[i]-'A'];
        }
        else
        {
            int x = i/100+1,y = i%100+1;
            a[x][y] = F[str[i]-'A'];
        }
    }
    for(int i = 1;i <= 100;i++,cout<<"\n") for(int j = 1;j <= 100;j++)
    {
        if(a[i][j] == 0) cout<<'R';
        if(a[i][j] == 1) cout<<'G';
        if(a[i][j] == 2) cout<<'B';
    }
    cout<<1<<" "<<1<<"\n";
    for(int i = 1;i < n;i++)
    {
        if(i%100 == 0)
        {
            cout<<"D";
            continue;
        }
        if((i/100)&1)
        {
            int x = i/100+1,y = 100-i%100;
            a[x][y] = F[str[i]-'A'];
            cout<<"L";
        }
        else
        {
            int x = i/100+1,y = i%100+1;
            a[x][y] = F[str[i]-'A'];
            cout<<"R";
        }
    }
    cout<<"\n";
    return 0;
}